﻿using System;

class BiggestOfThree
{
    static void Main()
    {
        //Write a program that finds the biggest of three integers using nested if statements.

        Console.WriteLine("Enter five variables.");
        Console.Write("Enter first variable: ");
        int firstNumber = int.Parse(Console.ReadLine());
        Console.Write("Enter second variable: ");
        int secondNumber = int.Parse(Console.ReadLine());
        Console.Write("Enter third variable: ");
        int thirdNumber = int.Parse(Console.ReadLine());

        if (firstNumber == secondNumber && firstNumber==thirdNumber && secondNumber == thirdNumber)
        {
            Console.WriteLine("The numbers are equal");
        }
        else
        {
            if ((firstNumber > secondNumber) && (firstNumber > thirdNumber))
            {
                Console.WriteLine("The greatest variable is first");
            }
            else if ((secondNumber > firstNumber) && (secondNumber > thirdNumber))
            {
                Console.WriteLine("The gratest variable is second");
            }
            else
            {
                Console.WriteLine("The gratest variable is third");
            }
        }
    }
}
